pp108 : GetActivity Instances

GetActivity Instances

This API returns the details of all the activity instances triggered for a Case instance.

Resource URI
/v1/cases/{model_id}/instances/{case_instance_id}/activities
Request Type

HTTP GET

HTTP Header Parameters

Parameter

Description

Accepted Input Values

SAMLart

The SAML artifact received after authentication. Refer to Login for more information on how to authenticate.

Note: The supported output formats are:

  • JSON
  • XML
Request Parameters
Parameter Description

model_id

The model ID of the Case.

case_instance_id

The instance ID of the Case instance.
Response Parameters

Parameter

Description

activity_instance

Unique identifier of the activity instance

case_instance

Unique identifier of the Case instance

activity

Unique identifier of the activity

planned_on

Timestamp when the activity was planned

started_on

Timestamp when the activity has started

last_modified_on

Timestamp when the activity was last modified

last_modified_by

Last user who modified the activity

correlation_id

CORRELATION_ID and ACTIVITY_INSTANCE_ID are the same, except in the scenario where a Case model is modeled in such a way that you can set your own generated GUID as the instance_id to instantiate a subprocess or a subcase model.

current_status

Current status of the activity. The possible values are:

  • COMPLETED
  • RELEASED
  • PLANNED
  • OBSOLETE
  • ABORTED

state_name

State to which the activity belongs

activity_name

Name of the Case activity

activity_type

Type of the Case activity. The possible values are :

  • HUMANTASK - If the activity is a user interface.
  • BPMTASK - If the activity is a BPM.
  • CASETASK - If the activity is a Case model.
Sample Response XML
 <GetActivityInstancesResponse xmlns="http://schemas.cordys.com/casemanagement/execution/1.0">
	<tuple>
		<old>
			<activity_instance>
				<activity_instance_id>03975354-8bc6-11e3-e83e-957e28e51dcf</activity_instance_id>
				<case_instance xmlns:S="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns2="http://schemas.cordys.com/casemanagement/execution/1.0">7763e2af-0bdc-11e3-e82b-31fd879e9d66</case_instance>
				<activity>eb54b374-9540-11e3-e77b-6eeafe4853bf</activity>
				<planned_on>1383200486378</planned_on>
				<started_on/>
				<last_modified_on>1383200486378</last_modified_on>
				<last_modified_by>cn=cordys,cn=organizational users,o=system,cn=cordys,cn=defaultInst,o=vanenburg.com</last_modified_by>
				<correlation_id/>
				<current_status>PLANNED</current_status>
				<case_state>
					<state_name>Registration</state_name>
				</case_state>
				<case_activity>
					<activity_name>Duplicate Check</activity_name>
					<activity_type>HUMANTASK</activity_type>
					<activity_model_id>00215A60-3EB8-11E2-EF7D-3DBF31323586</activity_model_id>
				</case_activity>
			</activity_instance>
		</old>
	</tuple>	
</GetActivityInstancesResponse>
Sample Response JSON
 {
	tuple: [2]
	0:  {
		old: {
			activity_instance: {
				activity_instance_id: "03975354-8bc6-11e3-e83e-957e28e51dcf"
				case_instance: "7763e2af-0bdc-11e3-e82b-31fd879e9d66"
				activity: "eb54b374-9540-11e3-e77b-6eeafe4853bf"
				planned_on: "1383200486378"
				started_on: ""
				last_modified_on: "1383200486378"
				last_modified_by: "cn=cordys,cn=organizational users,o=system,cn=cordys,cn=defaultInst,o=vanenburg.com"
				correlation_id: ""
				current_status: "PLANNED"
				case_state: {
					state_name: "Registration"
				}-
				case_activity: {
					activity_name: "Duplicate Check"
					activity_type: "HUMANTASK"
					activity_model_id: "00215A60-3EB8-11E2-EF7D-3DBF31323586"
				}-
			}-
		}-
	}-
	1:  {
		old: {
			activity_instance: {
				activity_instance_id: "0b7e0ff4-9cf0-11e3-e83e-95751050ddcc"
				case_instance: "7763e2af-0bdc-11e3-e82b-31fd879e9d66"
				activity: "eb54b374-9540-11e3-e77b-6eeafe4853bf"
				planned_on: "1383200485901"
				started_on: ""
				last_modified_on: "1383200485901"
				last_modified_by: "cn=cordys,cn=organizational users,o=system,cn=cordys,cn=defaultInst,o=vanenburg.com"
				correlation_id: ""
				current_status: "PLANNED"
				case_state: {
					state_name: "Registration"
				}-
				case_activity: {
					activity_name: "Duplicate Check"
					activity_type: "HUMANTASK"
					activity_model_id: "00215A60-3EB8-11E2-EF7D-3DBF31323586"
				}-
			}-
		}-
	}
}